//
//  InvitaionTableViewCell.m
//  XiangMuB
//
//  Created by 向修根 on 16/8/22.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "InvitaionTableViewCell.h"
#import "InvitationModel.h"
#import <UMSocialData.h>
#import <UMSocialSnsService.h>

#import <UMSocialSnsPlatformManager.h>

@interface InvitaionTableViewCell ()<UMSocialUIDelegate>

@end


@implementation InvitaionTableViewCell

- (void)layoutSubviews{
    [super layoutSubviews];
    [self.title setTitle:self.model.title forState:(UIControlStateNormal)];
    self.b.text = self.model.b;
    self.n.text = self.model.n;
    NSString *str = [NSString stringWithFormat:@"%@",self.model.v];
    self.v.text = str;
    
    //    弧度
    self.cellView.layer.cornerRadius = self.cellView.frame.size.width /50;
    self.cellView.layer.masksToBounds = YES;
    
    //   cell边框
    self.cellView.layer.borderWidth = 2;
    self.cellView.layer.borderColor = [[UIColor colorWithRed:192.0f/255.0f  green:192.0f/255.0f  blue:192.0f/255.0f  alpha:0.7]CGColor];

}



- (IBAction)titleButton:(UIButton *)sender {
}

- (IBAction)shareButton:(UIButton *)sender {
    NSString *str = [NSString stringWithFormat:@"%@",self.title.titleLabel.text];
//    [[UMSocialData defaultData].urlResource setResourceType:UMSocialUrlResourceTypeImage url:_dictDataDicrionary[@"picurl"]];
    //    [UMSocialData defaultData].extConfig.title = @"分享的title";
 
    [UMSocialSnsService presentSnsIconSheetView:self.cellView
                                         appKey:@"57b3dcf367e58e7ccf002006"
                                      shareText:str
                                     shareImage:[UIImage imageNamed:@"icon"]
                                shareToSnsNames:@[UMShareToSina,UMShareToTencent,UMShareToDouban,UMShareToQzone,UMShareToEmail,UMShareToSms,UMShareToQQ]
                                       delegate:self];
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
